package model 
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	/**
	 * ...
	 * @author bimkute
	 */
	public class GameData extends EventDispatcher
	{
		private static var instance:GameData;
		/*public var arrLoad:Array = [["http://www.daodudu.com/bimkute/tlmnTest/PlayGame.swf", "playGame"],
									["http://www.daodudu.com/bimkute/tlmnTest/BackGroundStart.swf", "bgAnim"]];*/
		/*public var arrLoad:Array = [["../lib/image/PlayGame.swf", "playGame"],
									["../lib/image/BackGroundStart.swf", "bgAnim"]];*/
									
		//public var arrLoad:Array = [["http://thanhha-jsc.com/ngutruonghuahen/lib/image/PlayGame.swf", "playGame"],
									//["http://thanhha-jsc.com/ngutruonghuahen/lib/image/BackGroundStart.swf", "bgAnim"]];
		public var arrLoad:Array = [["lib/image/PlayGame.swf", "playGame"],
									["lib/image/BackGroundStart.swf", "bgAnim"]];
		public var sizeSwf:Array = [5600000, 7900000, 13500000];
		
		private var _multi:Object = new Object();
		private var _timeRemain:int;
		private var _arrNumberDialing:Array = [];
		public var idGame:int;
		private var _totalMoneyToday:int;
		
		private var _totalBet:int;
		private var _result:Array = [];
		private var _totalWin:int;
		
		private var _checkLoading:Boolean = false;
		private var _canGetResult:Boolean = false;
		
		private var _callResult:Boolean;
		public var _checkHaveResult:Boolean = true;
		
		private var _arrTransaction:Array = [];
		
		private  var _checkSoundOn:Boolean = true;
		public  var fistTime:Boolean = true;
		
		private var _totalEachOfFish:Object = new Object();
		
		private var _arrTip:Array = [];
		public function GameData() 
		{
			
		}
		
		public static function getInstance():GameData 
		{
			if (!instance) 
			{
				instance = new GameData();
			}
			return instance;
		}
		
		public function get multi():Object 
		{
			return _multi;
		}
		
		public function set multi(value:Object):void 
		{
			_multi = value;
			dispatchEvent(new Event("multi"));
		}
		
		public function get timeRemain():int 
		{
			return _timeRemain;
		}
		
		public function set timeRemain(value:int):void 
		{
			_timeRemain = value;
			dispatchEvent(new Event("timeRemain"));
		}
		
		
		
		public function get arrNumberDialing():Array 
		{
			return _arrNumberDialing;
		}
		
		public function set arrNumberDialing(value:Array):void 
		{
			_arrNumberDialing = value;
			dispatchEvent(new Event("numberDialing"));
		}
		
		public function get callResult():Boolean 
		{
			return _callResult;
		}
		
		public function set callResult(value:Boolean):void 
		{
			_callResult = value;
			dispatchEvent(new Event("callResult"));
		}
		

		public function get checkLoading():Boolean 
		{
			return _checkLoading;
		}

		public function set checkLoading(value:Boolean):void 
		{
			_checkLoading = value;
			if (_checkLoading)
			{
				
				dispatchEvent(new Event("enableLoading"));
			}
			else
			{
				dispatchEvent(new Event("visibleLoading"));
			}
		}
		
		
		public function get canGetResult():Boolean 
		{
			return _canGetResult;
		}
		
		public function set canGetResult(value:Boolean):void 
		{
			_canGetResult = value;
			if (value) 
			{
				dispatchEvent(new Event("canGetResult"));
			}
			else 
			{
				dispatchEvent(new Event("checkGetResultAgain"));
			}
			
		}
		
//<<<<<<< .mine
		public function get totalBet():int 
		{
			return _totalBet;
		}
//=======
		
//>>>>>>> .r18
		
//<<<<<<< .mine
		public function set totalBet(value:int):void 
		{
			_totalBet = value;
			dispatchEvent(new Event("getTotalBet"));
		}
		
		
		public function get result():Array 
		{
			return _result;
		}
		
		public function set result(value:Array):void 
		{
			_result = value;
			dispatchEvent(new Event("getResult"));
		}
		
		public function get totalWin():int 
		{
			return _totalWin;
		}
		
		public function set totalWin(value:int):void 
		{
			_totalWin = value;
			dispatchEvent(new Event("getTotalWin"));
		}
		
//=======
		
		
		public function get totalMoneyToday():int 
		{
			return _totalMoneyToday;
		}
		
		public function set totalMoneyToday(value:int):void 
		{
			_totalMoneyToday = value;
			dispatchEvent(new Event("quithantai"));
		}
		
		public function get arrTransaction():Array 
		{
			return _arrTransaction;
		}
		
		public function set arrTransaction(value:Array):void 
		{
			_arrTransaction = value;
			dispatchEvent(new Event("historyTransaction"));
		}
		
		public function get checkSoundOn():Boolean 
		{
			return _checkSoundOn;
		}
		
		public function set checkSoundOn(value:Boolean):void 
		{
			_checkSoundOn = value;
			if (value) 
			{
				dispatchEvent(new Event("soundOn"));
			}
			else 
			{
				dispatchEvent(new Event("soundOff"));
			}
		}
		
		public function get totalEachOfFish():Object 
		{
			return _totalEachOfFish;
		}
		
		public function set totalEachOfFish(value:Object):void 
		{
			_totalEachOfFish = value;
			dispatchEvent(new Event("updateBetting"));
		}
		
		public function get arrTip():Array 
		{
			return _arrTip;
		}
		
		public function set arrTip(value:Array):void 
		{
			_arrTip = value;
			dispatchEvent(new Event("showTip"));
		}
		
	}

}